$(document).ready(function(){

    $('.showmsg').on('click',function(e){
        e.preventDefault();
        var info = $(this).data('msg');
        if(info==undefined||info.length==0) info="没有信息啦~";
        layer.msg(info,{
            time:1000,
            shadeClose:true,
            shade:0.1
        });

    })

    //返回上一层
    $('.h-back,.goback,.pageback').click(function(e){
        var that = $(this);
        var url = that.data('url');
        if(url==undefined||url.length==0){
            if(history.length==1){
                window.location.href = '/';
            }else{
                history.back();
            } 
        }else{
            window.location.href = url;
        }
    });


});